<!--
 * @Author: weidewei
 * @Date: 2025-05-21 15:10:23
 * @LastEditors: weidewei
 * @LastEditTime: 2025-05-21 17:26:38
 * @Description: 
 * @FilePath: \v3\src\views\home\components\TestPinia.vue
-->
<template>
    <div>
        <h2>TestPinia</h2>
        <h2>state: {{ counterStore.count }}</h2>
        <h2>getters：{{ counterStore.doubleCount }}</h2>
        <button @click="updateCount">更新state</button>
    </div>
</template>
<script setup lang="ts">
import { useCounterStore } from '@/stores/index'

const counterStore = useCounterStore()
console.log(counterStore)

function updateCount() {
    counterStore.increment()
}
</script>